<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.is.util.ParamUtil"%>
<%@page import="java.util.List"%>
<%@page import="com.is.model.CourseClass"%>
<%@page import="com.is.control.CourseClassControl"%>
<%@page import="com.is.control.ParamCourseControl"%>
<%  
    request.setCharacterEncoding("utf-8");
    int courseClassId = 0;
   // System.out.print(session.getAttribute("usercpid"));
   //用于查询时获取到session
    if(session.getAttribute("courseClassId")!=null&&!session.getAttribute("courseClassId").equals("")){
    	courseClassId = Integer.parseInt(""+session.getAttribute("serachdid"));
     }
     //System.out.print(cpid);
	int stuyear=ParamUtil.getInt(request,"stuyear",0);
	int classId = ParamUtil.getInt(request,"classId",0);
	//if(pid!=null&&!pid.equals("")){
	  //  id=Integer.parseInt(pid);
	//}
	//System.out.print(id);
	List<CourseClass> ccs = CourseClassControl.getAllCourseClassIdByClassIdAndStuyear(classId,stuyear);
	if(ccs.size()!=0){
				for(CourseClass cc:ccs){
			%>	
			 <option value="<%=cc.getId() %>" <%if(courseClassId==cc.getId()) out.println("selected='selected'");%> ><%=ParamCourseControl.getCourseById(cc.getCourseId()).getCourseName()%></option>
			
			<%
			}
			session.removeAttribute("courseClassId");
 }else{
	 %>
	 <option>----</option>
	 <%
 }%>
